package com.ziyueyuwen.xiniao.bean.question;

import java.util.ArrayList;
import java.util.List;

/**
 * @author wancheng  on 2019/1/9.
 */
public class PointSelectBean {
    private Integer id;
    private Integer parent;
    private Integer level;
    private String label;
    private String value;
    private List<PointSelectBean> children;

    public PointSelectBean() {
    }

    public PointSelectBean(Integer id, Integer parent, Integer level,String label, String value) {
        this.id = id;
        this.parent = parent;
        this.label = label;
        this.value = value;
        this.level = level;
        this.children = children;
    }

    public PointSelectBean addChildren(PointSelectBean bean){
        if (this.children == null){
            children = new ArrayList<>();
        }
        this.children.add(bean);
        return this;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getParent() {
        return parent;
    }

    public void setParent(Integer parent) {
        this.parent = parent;
    }

    public String getLabel() {
        return label;
    }

    public PointSelectBean setLabel(String label) {
        this.label = label;
        return this;
    }

    public String getValue() {
        return value;
    }

    public PointSelectBean setValue(String value) {
        this.value = value;
        return this;
    }

    public List<PointSelectBean> getChildren() {
        return children;
    }

    public PointSelectBean setChildren(List<PointSelectBean> children) {
        this.children = children;
        return this;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }
}
